/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MenuPrincipal.java
 *
 * Created on 8/11/2010, 11:45:06 AM
 */

package Vistas;

import Controlador.AplicativoAspi;
import Controlador.AplicativoBacante;
import Controlador.AplicativoContrato;
import Controlador.AplicativoEmpre;
import Controlador.AplicativoEntrevista;
import Controlador.AplicativoEvaluados;
import Controlador.AplicativoExp;
import Controlador.AplicativoPsicotecnica;
import Modelo.Conection;
import Modelo.ModeEntrevista;
import Modelo.ModelAspi;
import Modelo.ModelBacante;
import Modelo.ModelContrato;
import Modelo.ModelEmpresa;
import Modelo.ModelEvaluacion;
import Modelo.ModelExperiencia;
import Modelo.ModelPsicotecnica;

/**
 *
 * @author LOTICA
 */
public class MenuPrincipal extends javax.swing.JFrame {

    /** Creates new form MenuPrincipal */
     
 

     public MenuPrincipal(){
         initComponents();
         try{
            conect.connect();
        }catch(Exception ec){
            System.out.println("ec.t"+ec.toString());
        }
          
     }
Conection conect=new Conection();
     ModeEntrevista modeloentre=new ModeEntrevista(conect);
     ModelAspi modeloasp=new ModelAspi(conect);
     ModelBacante modelba=new ModelBacante(conect);
     ModelExperiencia modelexp=new ModelExperiencia(conect);
     AplicativoAspi aplicaaspi=new AplicativoAspi(modeloasp);     
     ModelEmpresa modeloempre=new ModelEmpresa(conect);
     AplicativoEmpre aplicaempre=new AplicativoEmpre(modeloempre);
     AplicativoBacante aplicaBa=new AplicativoBacante(modelba, aplicaempre);
     AplicativoExp apliExp=new AplicativoExp(modelexp,aplicaaspi);
     AplicativoEntrevista aplientre=new  AplicativoEntrevista(modeloentre,aplicaBa,aplicaaspi);
   ModelPsicotecnica modelps=new ModelPsicotecnica(conect);   
   AplicativoPsicotecnica aplips=new AplicativoPsicotecnica(modelps,aplicaBa,aplicaaspi);
ModelEvaluacion eva=new ModelEvaluacion(conect);
AplicativoEvaluados aplieva=new AplicativoEvaluados(eva,aplicaBa,aplicaaspi);
ModelContrato contramo=new ModelContrato (conect);
AplicativoContrato   aplicontrato=new AplicativoContrato(contramo,aplicaBa,aplicaaspi,aplieva);




    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMRegAspirante = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem11 = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem8 = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItem22 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        jMenuItem12 = new javax.swing.JMenuItem();
        jMenuItem13 = new javax.swing.JMenuItem();
        jMenuItem20 = new javax.swing.JMenuItem();
        jMenu5 = new javax.swing.JMenu();
        jMenuItem14 = new javax.swing.JMenuItem();
        jMenuItem21 = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem9 = new javax.swing.JMenuItem();
        jMenuItem10 = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JPopupMenu.Separator();
        jMenuItem19 = new javax.swing.JMenuItem();
        jMenu7 = new javax.swing.JMenu();
        jMenuItem15 = new javax.swing.JMenuItem();
        jMenuItem16 = new javax.swing.JMenuItem();
        jMenuItem17 = new javax.swing.JMenuItem();
        jMenuItem18 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Contratar De Colombia S.A"); // NOI18N

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setPreferredSize(new java.awt.Dimension(651, 441));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/Logo.jpg"))); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 671, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 506, Short.MAX_VALUE)
        );

        jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/male.png"))); // NOI18N
        jMenu1.setText("Aspirante");

        jMRegAspirante.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));
        jMRegAspirante.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/096.png"))); // NOI18N
        jMRegAspirante.setText("Registrar");
        jMRegAspirante.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMRegAspiranteActionPerformed(evt);
            }
        });
        jMenu1.add(jMRegAspirante);

        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/049.png"))); // NOI18N
        jMenuItem2.setText("Consultar");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/124.png"))); // NOI18N
        jMenuItem3.setText("Modificar");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Modificar(evt);
            }
        });
        jMenu1.add(jMenuItem3);

        jMenuItem11.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/150.png"))); // NOI18N
        jMenuItem11.setText("Eliminar");
        jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Eliminar(evt);
            }
        });
        jMenu1.add(jMenuItem11);
        jMenu1.add(jSeparator1);

        jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/101.png"))); // NOI18N
        jMenuItem4.setText("Salir");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem4);

        jMenuBar1.add(jMenu1);

        jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/023.png"))); // NOI18N
        jMenu2.setText("Contratos");

        jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/049.png"))); // NOI18N
        jMenuItem8.setText("Consultas");
        jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem8ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem8);

        jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/124.png"))); // NOI18N
        jMenuItem6.setText("Actuliazar");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ActuclaizarContrato(evt);
            }
        });
        jMenu2.add(jMenuItem6);

        jMenuItem22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/150.png"))); // NOI18N
        jMenuItem22.setText("Eliminar");
        jMenuItem22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Eliminarcontrato(evt);
            }
        });
        jMenu2.add(jMenuItem22);

        jMenuBar1.add(jMenu2);

        jMenu3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/170.png"))); // NOI18N
        jMenu3.setText("Bacantes");

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/096.png"))); // NOI18N
        jMenuItem1.setText("Registrar");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMBacantesActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem1);

        jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/049.png"))); // NOI18N
        jMenuItem5.setText("Consultar");
        jMenu3.add(jMenuItem5);

        jMenuBar1.add(jMenu3);

        jMenu4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/079.png"))); // NOI18N
        jMenu4.setText("Pruebas");

        jMenuItem12.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/021.png"))); // NOI18N
        jMenuItem12.setText("Psicotecnica");
        jMenuItem12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem12ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem12);

        jMenuItem13.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/030.png"))); // NOI18N
        jMenuItem13.setText("Entrevista");
        jMenuItem13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem13ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem13);

        jMenuItem20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/049.png"))); // NOI18N
        jMenuItem20.setText("Consulta de pruebas");
        jMenuItem20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Consulta(evt);
            }
        });
        jMenu4.add(jMenuItem20);

        jMenuBar1.add(jMenu4);

        jMenu5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/group.png"))); // NOI18N
        jMenu5.setText("Evaluados");

        jMenuItem14.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/049.png"))); // NOI18N
        jMenuItem14.setText("Aspirantes evaluados");
        jMenuItem14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem14ActionPerformed(evt);
            }
        });
        jMenu5.add(jMenuItem14);

        jMenuItem21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/096.png"))); // NOI18N
        jMenuItem21.setText("Regitrar Evaluado");
        jMenuItem21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Registrarevaluado(evt);
            }
        });
        jMenu5.add(jMenuItem21);

        jMenuBar1.add(jMenu5);

        jMenu6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/021.png"))); // NOI18N
        jMenu6.setText("Hoja de vida");

        jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem7.setText("Experiencia laboral");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuItem7);

        jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem9.setText("Referencias ");
        jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem9ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuItem9);

        jMenuItem10.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.ALT_MASK));
        jMenuItem10.setText("Estudios Realizados");
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuItem10);
        jMenu6.add(jSeparator2);

        jMenuItem19.setText("Generar Hoja de vida");
        jMenu6.add(jMenuItem19);

        jMenuBar1.add(jMenu6);

        jMenu7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/041.png"))); // NOI18N
        jMenu7.setText("Empresas");

        jMenuItem15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/096.png"))); // NOI18N
        jMenuItem15.setText("Registrar");
        jMenuItem15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RegistrarEmpresa(evt);
            }
        });
        jMenu7.add(jMenuItem15);

        jMenuItem16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/049.png"))); // NOI18N
        jMenuItem16.setText("Consultar");
        jMenuItem16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ConsultarEmpre(evt);
            }
        });
        jMenu7.add(jMenuItem16);

        jMenuItem17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/124.png"))); // NOI18N
        jMenuItem17.setText("Modificar");
        jMenuItem17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ModificarEmpresa(evt);
            }
        });
        jMenu7.add(jMenuItem17);

        jMenuItem18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ima/150.png"))); // NOI18N
        jMenuItem18.setText("Eliminar");
        jMenuItem18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                EliminarEmpre(evt);
            }
        });
        jMenu7.add(jMenuItem18);

        jMenuBar1.add(jMenu7);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 671, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 506, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMRegAspiranteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMRegAspiranteActionPerformed
            // TODO add your handling code here:
        if(this.conect.isConnect()){
           AspiranRegis resgisaspi=new AspiranRegis(aplicaaspi);
           resgisaspi.setVisible(true);
        }
       //
    }//GEN-LAST:event_jMRegAspiranteActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        if(this.conect.isConnect()){
            ConsultaAspirante ConsultaAs= new ConsultaAspirante(aplicaaspi);
            ConsultaAs.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMBacantesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMBacantesActionPerformed
        // TODO add your handling code here:
        if(this.conect.isConnect()){
            BacantesRe bacante=new BacantesRe(aplicaBa,aplicaempre);
            bacante.setVisible(true);
        }
    }//GEN-LAST:event_jMBacantesActionPerformed

    private void Eliminar(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Eliminar
        // TODO add your handling code here:
        if(this.conect.isConnect()){
            eliminarAspirante eliminar=new eliminarAspirante(aplicaaspi);
            eliminar.setVisible(true);
        }
    }//GEN-LAST:event_Eliminar

    private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
        // TODO add your handling code here:
        if(this.conect.isConnect()){
            ExperienciaLaboral e=new ExperienciaLaboral(apliExp,aplicaaspi);
            e.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem7ActionPerformed

    private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem9ActionPerformed
        // TODO add your handling code here:
        if(this.conect.isConnect()){
            Referencias r=new Referencias();
            r.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem9ActionPerformed

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        // TODO add your handling code here:
        if(this.conect.isConnect()){
            EstudiosRealizados e=new EstudiosRealizados();
            e.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed
        // TODO add your handling code here:
         if(this.conect.isConnect()){
            ContratoConsulta c=new ContratoConsulta(aplicontrato,aplieva);
            c.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem8ActionPerformed

    private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem12ActionPerformed
        // TODO add your handling code here:
         if(this.conect.isConnect()){
            PruebaPsicotecnica p=new PruebaPsicotecnica(aplips);
            p.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem12ActionPerformed

    private void jMenuItem13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem13ActionPerformed
        // TODO add your handling code here:
       if(this.conect.isConnect()){
            EntrevistaAsp e=new EntrevistaAsp(aplientre);
            e.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem13ActionPerformed

    private void jMenuItem14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem14ActionPerformed
        // TODO add your handling code here:
        if(this.conect.isConnect()){
            TodoEvaluados t=new TodoEvaluados(aplieva,aplicontrato);
            t.setVisible(true);
        }
    }//GEN-LAST:event_jMenuItem14ActionPerformed

    private void Modificar(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Modificar
        // TODO add your handling code here:
        if(this.conect.isConnect()){
           AspiranModificar modificar=new AspiranModificar(aplicaaspi);
           modificar.setVisible(true);
        }
    }//GEN-LAST:event_Modificar

    private void RegistrarEmpresa(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RegistrarEmpresa
        // TODO add your handling code here:
        // TODO add your handling code here:
        if(this.conect.isConnect()){
           EmpresaRegis regis=new EmpresaRegis(aplicaempre);
           regis.setVisible(true);
        }
    }//GEN-LAST:event_RegistrarEmpresa

    private void ConsultarEmpre(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ConsultarEmpre
        // TODO add your handling code here:}
        if(this.conect.isConnect()){
          ConsultaEmpre consul=new ConsultaEmpre(aplicaempre);
          consul.setVisible(true);
        }

    }//GEN-LAST:event_ConsultarEmpre

    private void ModificarEmpresa(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ModificarEmpresa
        // TODO add your handling code here:
         if(this.conect.isConnect()){
          ModificarEmpre modificar=new ModificarEmpre(aplicaempre);
                  modificar.setVisible(true);
        }
    }//GEN-LAST:event_ModificarEmpresa

    private void EliminarEmpre(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_EliminarEmpre
        // TODO add your handling code here:
          if(this.conect.isConnect()){
          EliminarEmpresa eliminar=new EliminarEmpresa(aplicaempre);
          eliminar.setVisible(true);
        }
    }//GEN-LAST:event_EliminarEmpre

    private void Consulta(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Consulta
        // TODO add your handling code here:
         if(this.conect.isConnect()){
        ConsultaPruebas entrevista=new ConsultaPruebas(aplientre,aplips);
        entrevista.setVisible(true);
        }
    }//GEN-LAST:event_Consulta

    private void Registrarevaluado(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Registrarevaluado
        // TODO add your handling code here:
        if(this.conect.isConnect()){
        RegistroEvaluados reeva=new RegistroEvaluados(aplieva,aplips,aplientre);
        reeva.setVisible(true);
        }
    }//GEN-LAST:event_Registrarevaluado

    private void ActuclaizarContrato(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ActuclaizarContrato
        // TODO add your handling code here:
         if(this.conect.isConnect()){
        ContratoActualizar cc=new ContratoActualizar(aplicontrato,aplieva);
        cc.setVisible(true);
        }
    }//GEN-LAST:event_ActuclaizarContrato

    private void Eliminarcontrato(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Eliminarcontrato
        // TODO add your handling code here:
         if(this.conect.isConnect()){
           EliminarContrato ec=new EliminarContrato(aplicontrato);
           ec.setVisible(true);
         }
    }//GEN-LAST:event_Eliminarcontrato

    /**
    * @param args the command line arguments
    */
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuItem jMRegAspirante;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenuItem jMenuItem12;
    private javax.swing.JMenuItem jMenuItem13;
    private javax.swing.JMenuItem jMenuItem14;
    private javax.swing.JMenuItem jMenuItem15;
    private javax.swing.JMenuItem jMenuItem16;
    private javax.swing.JMenuItem jMenuItem17;
    private javax.swing.JMenuItem jMenuItem18;
    private javax.swing.JMenuItem jMenuItem19;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem20;
    private javax.swing.JMenuItem jMenuItem21;
    private javax.swing.JMenuItem jMenuItem22;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JPopupMenu.Separator jSeparator2;
    // End of variables declaration//GEN-END:variables

    private void conectar() {
       Conection con= new Conection();
       try{
            con.connect();
            this.conect=con;
        }catch(Exception ec){
            System.out.println("ec.t"+ec.toString());
        }
       
    }




}
